package FirstSemester02;

public class Person {
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if (age <150 && age > 0) {
            this.age = age;
        }else {
             System.out.println("此年龄不合法");
        }

    }
}
